<script src="__PUBLIC__/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/styleaa.css"/>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/page.css" />

<style> 
.head_bottom_n {
    height: 29px;
    margin: 0 auto;
    position: absolute;
    left: 630px;
    top: 0px;
	width:400px;
	z-index:9999;
}
#znn_xiaoxi_div{position:absolute; height:10px; width:150px; top:0px; left:152px;}
#znn_xiaoxi{ position:absolute; height:100px; width:200px; border:3px solid #E7E7E7; background:#FFF;  top:0px; left:0px;}
#znn_xiaoxi p{ display:block; margin-top:10px;}
</style>
<SCRIPT language="javascript">
$(document).ready(function(){
//	getNews();
//	gotopermitpage();

});
var BackupDataFileName;


function BakcupData(){
	BackupDataFileName =  (new Date()).valueOf() + parseInt(Math.random()*1000000) ;
	$.post("__APP__/admin/BakcupData", 	
	{
		BackupDataFileName : BackupDataFileName
	} 
	, function(data){
		var filename = data.msg;
		//alert(nowsql);
	},"json");   

	$.post("__APP__/admin/WriteBakcupData", 	
	{
		BackupDataFileName : BackupDataFileName
	} 
	, function(data){
		var filename = data.msg;
	},"json");   

	$("#system li").removeClass("content_2_z2"); 
	$("#t10").addClass("content_2_z2");
	$("#head li a").removeClass("headBlue"); //去掉所有SPAN的样式 
	$("#head_3 a").addClass("headBlue");

	alert('备份数据成功');
	
}
/*
function gotopermitpage()
{

	var permissionlist = document.getElementById('permission').value;
	//alert(permissionlist);
	var regx1 = /admin_\w+/;
	var matched1 = permissionlist.match(regx1);
	var regx2 = /count_\w+/;
	var matched2 = permissionlist.match(regx2);
	var regx3 = /diancan_\w+/;
	var matched3 = permissionlist.match(regx3);
	var regx4 = /system_\w+/;
	var matched4 = permissionlist.match(regx4);
	var regx5 = /help_\w+/;
	var matched5 = permissionlist.match(regx5);
	//alert(matched3);
	if(matched1&&(matched1!='admin_index')){
		admin_url =  '__APP__/' + matched1[0].replace('_', '/');
		
		$("#head_1 a").attr('href', admin_url);
	}
	if(matched2&&(matched2!='count_index')){
		count_url =  '__APP__/' + matched2[0].replace('_', '/');
		$("#head_2 a").attr('href', count_url);
	}
	if(matched3&&(matched3!='diancan_manage')){
		diancan_url =  '__APP__/' + matched3[0].replace('_', '/');
		$("#head_5 a").attr('href', daincan_url);
	}
	if(matched4&&(matched4!='system_index')){
		system_url =  '__APP__/' + matched4[0].replace('_', '/');
		$("#head_3 a").attr('href', system_url);
	}
	if(matched5&&(matched5!='help_index')){
		help_url =  '__APP__/' + matched5[0].replace('_', '/');
		$("#head_4 a").attr('href', help_url);
	}
	
	
}
*/
/*
function RestoreData(){
	$.post("__APP__/admin/RestoreData", 	
	{
	} 
	, function(data){
		alert('恢复数据成功');
	},"json");   
}
*/

function logout(){
	if (confirm("您确定要退出后台管理吗？"))
	top.location = "__APP__/admin/logout";
	return false;
}


function closeTb(){
	$('#krnews').css("display",'none');
}




/*setInterval("getNews()",60000);*/
window.onbeforeunload=function (){
  //  alert("===onbeforeunload===");
    if(event.clientX>document.body.clientWidth && event.clientY < 0 || event.altKey){
   //     alert("你关闭了浏览器");
    }else{
   //     alert("你正在刷新页面");
    }
}
</script>

<div class="head" style="position:relative;"> 
 <div class="head_top">
  <div class="head_logo"><div></div></div>
  <div class="head_zi"><div></div></div>
  <div class="head_dh">
   <div class="head_dh_top">
   <input type="hidden" name="permission" id="permission" value="{$admin_permission}" />
       <ul>
           <li><a href="">使用帮助</a></li>
           <li><a href="">关于</a></li>
       </ul>
   </div>
   <div class="head_dh_bottom" id='head'>
    <ul>
	 <?php
	
     	if(strstr($admin_permission,"manage_")){
     	if(strstr($admin_permission,"manage_hinfo")){
     	     $str='hinfo';
     	}else{
           $arry=explode(',',$admin_permission);
           $arry0=$arry[0];
            $p1=explode('_',$arry0);
            $str=$p1[1];
     	}

     ?>
     		<li id='head_1'><a href="__APP__/admin/{$str}" class='headBlue'>系统管理</a></li>
		

     <?php
    	}
		if(strstr($admin_permission,"manageSys")){
    ?> 
     		<li id='head_3'><a href="__APP__/system/index" >系统维护</a></li>
	  <?php
    	}

     ?>
    </ul>
   </div>
  </div>
 </div> 
</div>

<div class="head_bottom">
 <div class="head_bottom_n">
  <ul>
   <li><a href="#">&nbsp 欢迎您，{$uname} &nbsp |</a></li>
   <li><a href="__APP__/system/index">&nbsp 账号管理 &nbsp   &nbsp &nbsp</a></li>
      <li><a href="#" onClick="logout();">退出</a></li>
   </ul>

 </div>
</div>

<div class="content">


 </div>
